package com.wideplay.warp.remoting;

import com.google.inject.Injector;
import com.google.inject.Inject;

/**
 * Created by IntelliJ IDEA.
 * User: dprasanna
 * Date: 1/10/2007
 * Time: 16:51:42
 *
 * This is a static hack to expose the injector as a singleton to local services (which are not managed by
 *  Guice). Hopefully this will go away when guice adds support for managed Scopes and interceptors.
 *
 * @author dprasanna
 * @since 1.0
 */
class InjectorProvider {
    private static Injector injector;

    @Inject
    public InjectorProvider(Injector injector) {
        InjectorProvider.injector = injector;
    }

    static Injector getInjector() {
        return injector;
    }
}
